//
//  popVIew.m
//  BrushFace
//
//  Created by 吕海瑞 on 15/12/27.
//  Copyright © 2015年 Zzz. All rights reserved.
//

#import "popVIew.h"

@interface popVIew ()
@property(nonatomic,strong) UILabel *whoLable;
@property(nonatomic,strong) UILabel *numLable;
@end
@implementation popVIew

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        
        _whoLable = [[UILabel alloc]initWithFrame:CGRectMake(30,22, 75, 20)];
       // _whoLable.text = @"朋友的朋友";
        [_whoLable setFont:[UIFont systemFontOfSize:12]];
        [_whoLable setTextColor:[UIColor whiteColor]];
        _whoLable.backgroundColor = [UIColor colorWithRed:36/255.0 green:119/255.0 blue:196/255.0 alpha:1];
        _whoLable.textAlignment = NSTextAlignmentRight;
        _whoLable.layer.cornerRadius = 6;
        _whoLable.clipsToBounds = YES;
        [self addSubview:_whoLable];
        
        UIImageView *imageView = [[UIImageView alloc]initWithFrame:CGRectMake(0, 0, 45, 45)];
        imageView.layer.cornerRadius = 45/2.0;
        imageView.image = [UIImage imageNamed:@"radarPop"];
        [self addSubview:imageView];
        
        _numLable = [[UILabel alloc]initWithFrame:CGRectMake(2,18, 40, 20)];
        //_numLable.text = @"2000";
        [_numLable setFont:[UIFont systemFontOfSize:12]];
        [_numLable setTextColor:[UIColor whiteColor]];
       
        _numLable.textAlignment = NSTextAlignmentCenter;
//        _numLable.layer.cornerRadius = 12;
//        _numLable.clipsToBounds = YES;
        [imageView addSubview:_numLable];

        
    }
    return self;
}
-(void)setWhoStr:(NSString *)whoStr
{
    _whoStr = whoStr;
    _whoLable.text = _whoStr;
    if ([_whoStr isEqualToString:@"我的朋友"]) {
        _whoLable.frame =CGRectMake(30,22, 65, 20);
    }
    else
    {
       _whoLable.frame = CGRectMake(30,22, 75, 20);
    }
}
-(void)setNum:(NSString *)num
{

    _num = num;
    _numLable.text = _num;
}


@end
